<template>
  <div class="person-item">
    <div class="person-item-left">
      <van-image
        style="border: 1px solid var(--font-color-std-1)"
        round
        cover
        width="45"
        height="45"
        :src="personInfo.img"
      />
    </div>
    <div class="person-item-right">
      <span class="person-item-right-username">{{ personInfo.username }}</span>
      <i class="iconfont icon-youjiantou"></i>
    </div>
  </div>
</template>

<script setup lang="ts">
import { defineProps } from "vue";
const props = defineProps({
  personInfo: {
    type: Object,
    default: () => ({}),
    required: true,
  },
});
</script>

<style scoped lang="less">
.person-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 56px;
  padding: 5px 20px;

  &-left {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
  }

  &-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 10px;
    flex: 1;
    min-width: 0;
    border-bottom: 1px solid var(--border-color-std-1);
    height: 100%;

    &-username {
      font-size: 14px;
      color: var(--font-color-std-2);
    }

    .icon-youjiantou {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 16px;
      color: var(--font-color-std-1);
      background-color: var(--background-color-std-2);
    }
  }
}
</style>
